package com.yc.cloud.adminweb.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class UserServiceImpl {

	@Autowired
	private RestTemplate restTemplate;

	//调用USER-SERVICE微服务中user方法
	public String findUserById(Integer id){
		return restTemplate.getForObject("http://USER-SERVICE/user/"+id,String.class);
	}

}
